# 代理：通过第三方的一个机器去发送请求

import requests

if __name__ == '__main__':
    url = "https://www.baidu.com/"

    proxies = {
        'https': 'https://59.110.139.131:3128'
    }

    session = requests.session()
    session.proxies = {"https": "121.204.139.6:3128"}
    session.keep_alive = False  # 关闭多余连接
    resp = session.get(url)
    resp.close()

    resp.encoding = 'utf-8'
    print(resp.text)
